|
In the context of a relational database table, a column is a set of data values of a particular simple type, one for each row of the table.〔The term "column" also has equivalent application in other, more generic contexts. See e.g., Flat file database, Table (information).〕 The columns provide the structure according to which the rows are composed. When a column allows data values of a single type, it does not essentially mean it only has simple text values. Other databases go beyond and let the data be stored as a file on Operating System whereas the column data only covers a pointer or a link to the actual file. Also, databases mostly let columns to have more complex data for example whole documents, images or even video clips. In relational database terminology, column's equivalent is called attribute. For example, a table that represents companies might have the following columns: * ID (integer identifier, unique to each row) * Name (text) * Address line 1 (text) * Address line 2 (text) * City (integer identifier, drawn from a separate table of cities, from which any state or country information would be drawn) * Postal code (text) * Industry (integer identifier, drawn from a separate table of industries) * etc. Each row would provide a data value for each column and would then be understood as a single structured data value, in this case representing a company. More formally, each row can be interpreted as a relvar, composed of a set of tuples, with each tuple consisting of the two items: the name of the relevant column and the value this row provides for that column. Examples of database: PostgreSQL, MySQL, SQL Server, Access, Oracle, Sybase, DB2. Coding involved: SQL (Query Language ) See more at SQL. == Field == The word 'field' is normally used interchangeably with 'column'. However, database perfectionists tends to favor to use the word 'field' to signify a specific value or single item of a column. Therefore, a field is joint of a row and column. 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Column (database)」の詳細全文を読む スポンサード リンク
|